import Vue from 'vue'
import Vuex from 'vuex'
 // 导入独立模块
import shelf from './modules/shelf'
import user from './modules/user'
// 导入vuex-persistedstate
import createPersistedstate from 'vuex-persistedstate'

Vue.use(Vuex);



const store = new Vuex.Store({
	state: {},
	mutations: {},
	actions: {},
	getters: {},
	modules: {
		// 应用独立模块
		shelf,
		user
	},
	 // 设置缓存同步配置
	plugins:[
		createPersistedstate()
	]
	
})
export default store;